import request from "@/api/request.js";

// 获取粉丝列表
export function getFunList(id) {
    return request({
        url: "/api/user-subscription/getFans/" + id,
        method: 'get',
        // data: params,
    })
}

// 获取关注人的列表
export function getIdols(params) {
    return request({
        url: "/api/user-subscription/getIdols/" + params,
        method: 'get',
        // data: params,
    })
}

// 取消关注
export function delect(params) {
    return request({
        url: "/api/user-subscription/delete?" + "fromId=" + params.fromId + "&toId=" + params.toId,
        method: 'DELETE',
        // data: params,
    })
}

// 关注
export function add(params) {
    return request({
        url: "/api/user-subscription/add",
        method: "post",
        data: params,
    })
}

//判断是否关注
export function isAttention(params) {
    return request({
        url: "/api/user-subscription/isAttention?fromId=" + params.fromId + "&toId=" + params.toId,
        method: "get",
    })
}